package com.david.dao;

import com.david.entity.Employee;
import com.david.vo.EmployeeCondition;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author David
 */
@Mapper
public interface EmployeeMapper {
    /**
     * 不需要传入参数
     * @return 返回所有的集合
     */
    List<Employee> getAllEmployee();

    /**
     * @param employee 插入一行数据
     */
    void save(Employee employee);

    /**
     * @param id 根据id查询
     * @return 返回是否存在对象
     */
    Employee findEmployee(Integer id);

    void deleteEmployee(Integer id);

    void batchDelete(Integer[] ids);

    List<Employee> findEmployeeByPhone(String phone);

    List<Employee> findEmployeeByCondition(EmployeeCondition employeeCondition);

    void updateEmployee(Employee employee);

}
